
*------------------------------PLEASE READ-------------------------------------*

/*

REPLICATION FILE FOR FIGURE B1
AUTHOR: ZHENHUAN LEI & YISHUANG LI
DATE: 11/13/2023
SOFTWARE: STATA 17 SE OPERATED ON WINDOWS 11
*/

*-------------------------- Set up the environment ---------------------------*


clear 
use ../source/city_fiscal.dta
***Scaling
replace exp_court = exp_court/100
replace exp_pc = exp_pc/100
replace exp_police = exp_police/100
replace exp_justice = exp_justice/100

*-------------------------- Plotting -------------------------------*
//Figure B1

**City 

*court

	twoway (connected exp_court year if city_id == 220500 & year>=2013 , ///
		mcolor(red) lcolor(red) msymbol(D) xlabel(2013(1)2019)) ///
		(connected exp_court year if city_id == 371700 &year>=2013 , ///
		mcolor(blue) lcolor(blue) msymbol(Th) lpattern(dash) xlabel(2013(1)2019)), ///
		xline(2015.5,lp(dash) lstyle(minor_grid)) ///
		legend(label(1 "Tonghua(Jilin)") label(2 "Heze(Shandong)")) ///
		title("Panel A. Perfectural Government's Expenditure on Court") ///
		ytitle("Million Yuan") ///
		xtitle("")
	graph export ../result/FigureB1_PanelA.jpg, replace

*congress

	twoway (connected exp_pc year if city_id == 220500 & year>=2013 , ///
		mcolor(red) lcolor(red) msymbol(D) xlabel(2013(1)2019) ylabel(0(50)200)) ///
		(connected exp_pc year if city_id == 371700 &year>=2013 , ///
		mcolor(blue) lcolor(blue) msymbol(Th) lpattern(dash) xlabel(2013(1)2019)), ///
		xline(2015.5,lp(dash) lstyle(minor_grid)) ///
		legend(label(1 "Tonghua(Jilin)") label(2 "Heze(Shandong)")) ///
		title("Panel C. Perfectural Government's Expenditure on Judicial Expenditure ") ///
		ytitle("Million Yuan") ///
		xtitle("")
	graph export ../result/FigureB1_PanelC.jpg, replace

*police

	twoway (connected exp_police year if city_id == 220500 & year>=2013 , ///
		mcolor(red) lcolor(red) msymbol(D) xlabel(2013(1)2019) ylabel(0(200)800)) ///
		(connected exp_police year if city_id == 371700 &year>=2013 , ///
		mcolor(blue) lcolor(blue) msymbol(Th) lpattern(dash) xlabel(2013(1)2019)), ///
		xline(2015.5,lp(dash) lstyle(minor_grid)) ///
		legend(label(1 "Tonghua(Jilin)") label(2 "Heze(Shandong)")) ///
		title("Panel E. Perfectural Government's Expenditure on Police") ///
		ytitle("Million Yuan") ///
		xtitle("")
	graph export ../result/FigureB1_PanelE.jpg, replace

*judicial expenditure 

	twoway (connected exp_justice year if city_id == 220500 & year>=2013 , ///
		mcolor(red) lcolor(red) msymbol(D) xlabel(2013(1)2019) ylabel(0(50)200)) ///
		(connected exp_justice year if city_id == 371700 &year>=2013 , ///
		mcolor(blue) lcolor(blue) msymbol(Th) lpattern(dash) xlabel(2013(1)2019)), ///
		xline(2015.5,lp(dash) lstyle(minor_grid)) ///
		legend(label(1 "Tonghua(Jilin)") label(2 "Heze(Shandong)")) ///
		title("Panel G. Perfectural Government's Expenditure on Judicial Expenditure ") ///
		ytitle("Million Yuan") ///
		xtitle("")
	graph export ../result/FigureB1_PanelG.jpg, replace

*-------------------------- Set up the environment ---------------------------*
clear 
use ../source/pro_exp.dta
*** Scaling 
replace exp_court = exp_court/100
replace exp_npc = exp_npc/100
replace exp_ps= exp_ps/100
replace exp_jud = exp_jud/100
*-------------------------- Plotting -------------------------------*
*provicial 

* court 

	twoway (connected exp_court year if pro_code == 22 & year>=2013 , ///
		mcolor(red) lcolor(red) msymbol(D) xlabel(2013(1)2019) ) ///
		(connected exp_court year if pro_code == 37 &year>=2013 , ///
		mcolor(blue) lcolor(blue) msymbol(Th) lpattern(dash) xlabel(2013(1)2019)), ///
		xline(2015.5,lp(dash) lstyle(minor_grid)) ///
		legend(label(1 "Jilin Province") label(2 "Shandong Province")) ///
		title("Panel B. Provincial Government's Expenditure on Court") ///
		ytitle("Million Yuan") ///
		xtitle("")
	graph export ../result/FigureB1_PanelB.jpg, replace

*congress

	twoway (connected exp_npc year if pro_code == 22 & year>=2013 , ///
		mcolor(red) lcolor(red) msymbol(D) xlabel(2013(1)2019) ylabel(0(50)200)) ///
		(connected exp_npc year if pro_code == 37 &year>=2013 , ///
		mcolor(blue) lcolor(blue) msymbol(Th) lpattern(dash) xlabel(2013(1)2019)), ///
		xline(2015.5,lp(dash) lstyle(minor_grid)) ///
		legend(label(1 "Jilin province") label(2 "Shandong province")) ///
		title("Panel D. Provincial Government's Expenditure on Congress") ///
		ytitle("Million Yuan") ///
		xtitle("")
	graph export ../result/FigureB1_PanelD.jpg, replace

*police

	twoway (connected exp_ps year if pro_code == 22 & year>=2013 , ///
		mcolor(red) lcolor(red) msymbol(D) xlabel(2013(1)2019) ylabel(0(500)2500)) ///
		(connected exp_ps year if pro_code == 37 &year>=2013 , ///
		mcolor(blue) lcolor(blue) msymbol(Th) lpattern(dash) xlabel(2013(1)2019)), ///
		xline(2015.5,lp(dash) lstyle(minor_grid)) ///
		legend(label(1 "Jilin province") label(2 "Shandong province")) ///
		title("Panel F. Provincial Government's Expenditure on Police") ///
		ytitle("Million Yuan") ///
		xtitle("")
	graph export ../result/FigureB1_PanelF.jpg, replace

*judicial expenditure

	twoway (connected exp_jud year if pro_code == 22 & year>=2013 , ///
		mcolor(red) lcolor(red) msymbol(D) xlabel(2013(1)2019) ylabel(0(50)200)) ///
		(connected exp_jud year if pro_code == 37 &year>=2013 , ///
		mcolor(blue) lcolor(blue) msymbol(Th) lpattern(dash) xlabel(2013(1)2019)), ///
		xline(2015.5,lp(dash) lstyle(minor_grid)) ///
		legend(label(1 "Jilin province") label(2 "Shandong province")) ///
		title("Panel H. Provincial Government's Expenditure on Police") ///
		ytitle("Million Yuan") ///
		xtitle("")
	graph export ../result/FigureB1_PanelH.jpg, replace






